package com.first.service.Impl;

import com.first.entity.ClassEntity;
import com.first.mapper.ClassMapper;
import com.first.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassServiceImpl implements ClassService {

    @Autowired
    private ClassMapper classMapper;

    @Override
    public List<ClassEntity> getClassList() {
        List<ClassEntity> classList = classMapper.getClassList();
        return classList;
    }

    @Override
    public int updateClass(String className, String classType, Integer classNumber, Integer id) {
        int i = classMapper.updateClass(className, classType, classNumber, id);
        return i;
    }

    @Override
    public int deleteClass(Integer id) {
        int i = classMapper.deleteClass(id);
        return i;
    }

    @Override
    public int insertClass(String className, String classType, Integer classNumber) {
        int i = classMapper.insertClass(className, classType, classNumber);
        return i;
    }
}
